From: Ondřej Surý Date: Sat, 2 Dec 2023 21:09:36 +0000 (+0100) Subject: Disable assembly detection in Zend arithmetic with gcc < 5 X-Git-Tag: archive/raspbian/8.4.27-1+rpi1^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5ef83d13e2454bb780683e66c70d827646914fe4;p=php8.4.git Disable assembly detection in Zend arithmetic with gcc < 5 Gbp-Pq: Name 0042-Disable-assembly-detection-in-Zend-arithmetic-with-g.patch --- diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index ddc37329..56517dc6 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -534,7 +534,7 @@ ZEND_API void zend_reset_lc_ctype_locale(void); static zend_always_inline void fast_long_increment_function(zval *op1) { -#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && (__GNUC__ > 4) __asm__ goto( "addl $1,(%0)\n\t" "jo %l1\n" @@ -597,7 +597,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL static zend_always_inline void fast_long_decrement_function(zval *op1) { -#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && (__GNUC__ > 4) __asm__ goto( "subl $1,(%0)\n\t" "jo %l1\n" @@ -660,7 +660,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL static zend_always_inline void fast_long_add_function(zval *result, zval *op1, zval *op2) { -#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && (__GNUC__ > 4) __asm__ goto( "movl (%1), %%eax\n\t" "addl (%2), %%eax\n\t" @@ -750,7 +750,7 @@ overflow: ZEND_ATTRIBUTE_COLD_LABEL static zend_always_inline void fast_long_sub_function(zval *result, zval *op1, zval *op2) { -#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && !(4 == __GNUC__ && 8 == __GNUC_MINOR__) +#if ZEND_USE_ASM_ARITHMETIC && defined(__i386__) && (__GNUC__ > 4) __asm__ goto( "movl (%1), %%eax\n\t" "subl (%2), %%eax\n\t"